home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!genesis.demon.co.uk
- From: Lawrence Kirby <fred@genesis.demon.co.uk>
- Newsgroups: comp.lang.c
- Subject: Re: Array Parameters
- Date: Fri, 05 Jan 96 13:05:26 GMT
- Organization: none
- Message-ID: <820847126snz@genesis.demon.co.uk>
- References: <wayne.820650643@hawk> <4ce349$4j9@hacgate2.hac.com> <820701694snz@genesis.demon.co.uk> <4cg104$qmp@nervous.pdb.sni.de> <4cgmuc$k9k@hacgate2.hac.com> <4chic0$mkd@news.microsoft.com>
- Reply-To: fred@genesis.demon.co.uk
- X-NNTP-Posting-Host: genesis.demon.co.uk
- X-Newsreader: Demon Internet Simple News v1.27
- X-Mail2News-Path: genesis.demon.co.uk
-
- In article <4chic0$mkd@news.microsoft.com>
- a-cnadc@microsoft.com "Dann Corbit" writes:
-
- >If you pass the struct by value you will get a copy of the whole structure.
- >This means that:
- >1. All sizeof( struct foo ) bytes are piled onto the stack
- >2. You can change the contents of the array in the function without
- > changing the contents of the array in the calling program.
-
- <example program deleted>
-
- Yes, it is easy to show that it makes a difference. However can you come
- up with an example where it is actually useful, i.e. you can't achieve the
- same overall effect more simply using other methods (e.g. with a local
- array in the called function)?
-
- --
- -----------------------------------------
- Lawrence Kirby | fred@genesis.demon.co.uk
- Wilts, England | 70734.126@compuserve.com
- -----------------------------------------
-